home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 19 / 8 / DISK1982.ZIP / CH2_1.DOC < prev    next >
Text File  |  1991-03-15  |  30KB  |  1,075 lines

  1. ..pgno01
  2. ..foot60A2-##
  3. ..head02L──────────────────────────────────────────────────────────────────────
  4. ..head04L──────────────────────────────────────────────────────────────────────
  5. ..head03LDeclarations
  6. Type
  7.    TSet = Set Of 0..255;
  8.  
  9.  
  10. Var
  11.  
  12.    CheckSnow  : Boolean  used to enable or disable snow-checking when
  13.                          reading or writing data directly to video
  14.                          memory.
  15.  
  16.    TextAttr   : Byte     global variable that contains the currently
  17.                          selected video attribute.
  18.  
  19.    InsMode    : Byte     global variable used by EditSt to indicate if
  20.                          the cursor is in insert or overwrite mode.
  21.  
  22.    VioBaseSeg : Word     contains the base segment address of the
  23.                          current video page.
  24.  
  25.    VioCols    : Word     contains the screen width which is the total
  26.                          number of characters per line.
  27.  
  28.    VioCursor  : Word     contains the size of the cursor with the
  29.                          starting scan line in the high byte and the
  30.                          ending scan line in the low byte.
  31.  
  32.    VioPage    : Word     contains the active video page in use.  The
  33.                          value should always be zero for a monochrome
  34.                          adapter.
  35.  
  36.    WindMax    : Word     used for the lower right corner of the window
  37.                          that is currenlty defined thru the use of the
  38.                          Window function.
  39.  
  40.    WindMin    : Word     used for the upper left corner of the window
  41.                          that is currently defined thru the use of the
  42.                          Window function.
  43. ..page
  44. ..head03ABorderColor
  45. ■ Description
  46.  
  47.   Sets the color for the border screen.
  48.  
  49.  
  50. ■ Summary
  51.  
  52.   Procedure BorderColor( Color : Integer );
  53.  
  54.   Color       defines the color of the border screen.
  55.  
  56.  
  57. ■ Remarks
  58.  
  59.   The following colors are allowed for the border color if you have a
  60.   Color/Graphics Monitor Adapter.  BorderColor does not have any
  61.   effect on a monochrome display.
  62.  
  63.   0  Black         8  Gray
  64.   1  Blue          9  Light Blue
  65.   2  Green        10  Light Green
  66.   3  Cyan         11  Light Cyan
  67.   4  Red          12  Light Red
  68.   5  Magenta      13  Light Magenta
  69.   6  Brown        14  Yellow
  70.   7  White        15  High-intensity White
  71.  
  72.  
  73. ■ Example
  74.  
  75.   Program Example;
  76.   Uses FPVideo;
  77.   Var
  78.      i,j : Integer;
  79.   Begin
  80.      For i := 0 To 15 Do Begin
  81.         BorderColor( i );
  82.         j := GetKey();
  83.      End;
  84.   End.
  85.  
  86.   In this example the sixteen available colors for the border will be
  87.   displayed. A new color will be displayed each time a key is pressed.
  88. ..page
  89. ..head03AClrWin
  90. ■ Description
  91.  
  92.   Clear window area with the specified color.
  93.  
  94.  
  95. ■ Summary
  96.  
  97.   Procedure ClrWin( x1, y1, x2, y2, Attr : Integer );
  98.  
  99.   x1          left column of window.
  100.  
  101.   y1          top row of window.
  102.  
  103.   x2          right column of window.
  104.  
  105.   y2          bottom row of window.
  106.  
  107.   Attr        integer in the range 0-255 defining the foreground and
  108.               background byte combination for the color of the window.
  109.  
  110.  
  111. ■ Remarks
  112.  
  113.   This procedure will blank the window area for the window coordinates
  114.   that are passed.  ClrWin does not move the cursor from its current
  115.   position.
  116.  
  117.  
  118. ■ Example
  119.  
  120.   Program Example;
  121.   Uses FPVideo;
  122.   Begin
  123.      ClrWin( 5, 5, 40, 20, 7 );
  124.   End.
  125.  
  126.   When ClrWin is called in this example the window area (5,5,40,20)
  127.   will be cleared with the attribute value of 7.
  128. ..page
  129. ..head03AColorMsg
  130. ■ Description
  131.  
  132.   Display string on the screen using the color attribute specified.
  133.  
  134.  
  135. ■ Summary
  136.  
  137.   Procedure ColorMsg( x, y, Attr : Integer; Message : String );
  138.  
  139.   x           column to begin display of message.
  140.  
  141.   y           row to begin display of message.
  142.  
  143.   Attr        integer in the range 0-255.  It is the color to use for
  144.               displaying the message.
  145.  
  146.   Message     string message to be displayed.
  147.  
  148.  
  149. ■ Remarks
  150.  
  151.   ColorMsg is NOT sensitive to Turbo's currently defined window and
  152.   will wrap around to column one on the next line of the screen when
  153.   necessary. ColorMsg will not scroll the screen if the data to be
  154.   displayed is to extend beyond the last row of the screen.
  155.  
  156.  
  157. ■ See Also
  158.  
  159.   DspMsg, WriteSt, WriteStln
  160.  
  161. ..page
  162. ■ Example
  163.  
  164.   Program Example;
  165.   Uses FPVideo;
  166.   Var
  167.      p  : String;
  168.      st : String;
  169.      i  : Integer;
  170.   Begin
  171.      ClrWin( 1, 1, 80, 25, 7 );
  172.      St := 'Color-line';
  173.  
  174.      For i := 0 To 8 Do Begin
  175.         Str( i:1, p );
  176.         ColorMsg( 1, i+1, 1+i, St + p );
  177.         ColorMsg( 1, i+10, 48+i, St + p );
  178.      End;
  179.   End.
  180.  
  181.   This program example will display nine lines on the upper and lower
  182.   half of the screen.  The upper half of the screen will display black
  183.   as the background color. The lower half will use cyan as the
  184.   background color.
  185. ..page
  186. ..head03ADspMsg
  187. ■ Description
  188.  
  189.   Display string on the screen without changing the color attribute
  190.   that is currently on the display screen.
  191.  
  192.  
  193. ■ Summary
  194.  
  195.   Procedure DspMsg( x, y : Integer; Message : String );
  196.  
  197.   x           column to begin display of message.
  198.  
  199.   y           row to begin display of message.
  200.  
  201.   Message     string message to display.
  202.  
  203.  
  204. ■ Remarks
  205.  
  206.   DspMsg is NOT sensitive to Turbo's currently defined window and will
  207.   wrap around to column one on the next line of the screen when
  208.   necessary. DspMsg will not scroll the screen if the data to be
  209.   displayed is to extend beyond the last row of the screen.
  210.  
  211.  
  212. ■ See Also
  213.  
  214.   ColorMsg, WriteSt, WriteStln
  215.  
  216.  
  217. ■ Example
  218.  
  219.   Program Example;
  220.   Uses FPVideo;
  221.   Var
  222.      i : Integer;
  223.   Begin
  224.      ClrWin( 1, 1, 80, 25, 7 );
  225.      For i := 1 To 25 Do
  226.         FillRowAttr( 1, i, 80, i );
  227.      For i := 1 To 25 Do
  228.         DspMsg( 1, i, 'This is a test message' );
  229.   End.
  230.  
  231.   This program example will display a different attribute color to
  232.   each row of the display, then a message will be displayed on each
  233.   line without changing the attribute bytes that already exist on the
  234.   screen.
  235. ..page
  236. ..head03AEditSt
  237. ■ Description
  238.  
  239.   Edit an existing or null string from the keyboard.
  240.  
  241.  
  242. ■ Summary
  243.  
  244.   Procedure EditSt(     Row      : Integer;
  245.                         StCol    : Integer;
  246.                         SpCol    : Integer;
  247.                         Len      : Integer;
  248.                         CharCase : Integer;
  249.                         FillCh   : Integer;
  250.                         AutoSkip : Integer;
  251.                         ErrTone  : Integer;
  252.                         ErrDur   : Integer;
  253.                         VCSet    : TSet;
  254.                         TCSet    : TSet;
  255.                     Var ChOfs    : Integer;
  256.                     Var TE       : Integer;
  257.                     Var St       : String   );
  258.  
  259.   Row         defines row to edit string on.
  260.  
  261.   StCol       defines left or start column of field to edit. This
  262.               value must be less than or equal to SpCol.
  263.  
  264.   SpCol       defines right or stop column of the field to edit. This
  265.               value must be greater than or equal to StCol.
  266.  
  267.   Len         integer in the range of 1-255.  It is the maximum length
  268.               of the string to be edited.
  269.  
  270.   CharCase    integer in the range 1-3. The Case Mode indicator
  271.               defines how a character is displayed on the screen and
  272.               stored in the string variable being edited.
  273.                  1 = Do nothing to character
  274.                  2 = Convert all characters to upper case
  275.                  3 = Convert all characters to lower case
  276.  
  277.   FillCh      integer in the range of 0-255.  This defines the ascii
  278.               character that is displayed in the field for undefined
  279.               character positions in the field being edited.
  280.  
  281.   AutoSkip    integer indicating if an auto exit is desired when the
  282.               last character in the field has been typed.
  283.                  0 - No auto exit
  284.                  1 - Auto exit after last character in field is
  285.                      entered.
  286. ..page
  287.   ErrTone     integer in units giving the frequency for beeping the
  288.               speaker.
  289.  
  290.   ErrDur      integer in units giving the length of time the speaker
  291.               is to beep.
  292.  
  293.   VCSet       set of valid characters, [0..255], that will be accepted
  294.               for data entry.
  295.  
  296.   TCSet       set of extended keyboard characters, [0..255], that are
  297.               allowed to terminate this procedure. (Refer to appendix
  298.               C for a listing of these codes.)
  299.  
  300.   CharOfs     an integer that indicates the beginning cursor position
  301.               within the string.  If CharOfs is a 1 then editing will
  302.               begin in the first column of the field input area.  If
  303.               CharOfs is 256 or greater than the length of the string
  304.               to be edited, the cursor will be positioned after the
  305.               last character in the string. On exit from EditSt
  306.               CharOfs will contain the cursor position within the
  307.               string.
  308.  
  309.   TE          is the terminating element number that terminated the
  310.               string input procedure. TE will be in the range of 0-255
  311.               which corresponds to the element number in appendix C.
  312.  
  313.   St          string buffer area to receive the input data.
  314.  
  315.  
  316. ■ Remarks
  317.  
  318.   The maximum length of the string to edit is 255 characters.  The
  319.   data will be entered on one line. If the maximum length of the
  320.   string exceeds the number of display columns, SpCol - StCol + 1, the
  321.   string will scroll horizontally on the screen within the StCol and
  322.   SpCol columns.
  323. ..page
  324.  Editing Keys:
  325.     The following gives an explanation of the editing keys that may be
  326.     used with EditSt, provided the key pressed is not defined in the
  327.     terminating character set. EditSt calls the function GetKey, in
  328.     the unit SSGetKey, which returns an integer.  This integer is a
  329.     value from 0-384 which corresponds to an element number that is
  330.     defined in Appendix C.  The function GetKey is provided with a
  331.     table that maps the key element numbers to the index number.
  332.     Example, If the cursor is to move right one character position
  333.     using the Ctrl-D key combination the value for Ctrl-D index key
  334.     (element number 136) must map to the right arrow key (element
  335.     number 77). The initialization of the Ctrl-D key for KeyTable[136]
  336.     would be 77.
  337.  
  338.     LeftArr       will move the cursor left one character position on
  339.                   the screen until the StCol is reached.  If the
  340.                   beginning of the string has not been reached the
  341.                   string will be scrolled on the screen within the
  342.                   StCol and SpCol boundaries.
  343.  
  344.     RightArr      will move the cursor right one character position on
  345.                   the screen until the end of the string is reached.
  346.                   If the cursor is in the SpCol and there is still
  347.                   more in the string that can be displayed the string
  348.                   will then be scrolled within the StCol and SpCol
  349.                   boundaries.
  350.  
  351.     Home          will place the cursor in the StCol on the screen and
  352.                   positioned under the first character in the edit
  353.                   string.
  354.  
  355.     End           will position the cursor after the last character in
  356.                   the edit string.
  357.  
  358.     BackSpace     If the StCol is displaying the first character in
  359.                   the string being edited the cursor will move to the
  360.                   left one column and delete the character in that
  361.                   column. If the character being displayed in the
  362.                   StCol is not the first character in the string being
  363.                   edited the cursor will remain in the same column
  364.                   position and delete the character to the left of the
  365.                   cursor and pull the string towards the cursor.
  366.  
  367.     Esc           will blank the string currently in the field.  If
  368.                   the field is already blank the procedure will
  369.                   restore the string that was passed to this
  370.                   procedure.
  371.  
  372.     Tab           will move the cursor to the right five column
  373.                   positions if the SpCol has not been reached.  If the
  374.                   StCol has been reached then the string display will
  375.                   be shifted right.
  376. ..page
  377.     ^LeftArrow    will move the cursor to the left five column
  378.                   positions if the StCol has not been reached.  If the
  379.                   cursor is in the StCol then only the display string
  380.                   will be adjusted to reflect the movement of the
  381.                   cursor.
  382.  
  383.     Del           removes the character the cursor is under and
  384.                   decrements the string length by one. All the
  385.                   characters to the right of the cursor position are
  386.                   moved left one position within the string and
  387.                   display area.
  388.  
  389.     Ctrl-X        will delete all characters from the current string
  390.                   position to the end of the string.  All deleted
  391.                   characters will be replaced with the FillCh that was
  392.                   specified when calling this procedure.
  393.  
  394. ■ Example
  395.  
  396.   Program Example;
  397.   Uses FPVideo;
  398.   Const
  399.     TCSet : TSet = [1,13,72,80];
  400.     VCSet : TSet = [32..255];
  401.   Var
  402.      St       : String;
  403.      TE,ChOfs : Integer;
  404.   Begin
  405.      FillChar( St, SizeOf( St ), 0 );
  406.      ChOfs := 1;
  407.      TE    := 0;
  408.      EditSt(5,10,20,30,2,7,0,5000,5000,VCSet,TCSet,ChOfs,TE,St);
  409.   End.
  410.  
  411.   This example will edit a string of up to thirty characters into St.
  412.   The screen will display each character as entered starting in column
  413.   ten on row five.  The display area of the screen goes from columns
  414.   ten to twenty and will do a horizontal scroll in that area when the
  415.   eleventh character is entered.
  416.  
  417.   All alphabetic characters, ['a'..'z'], will automatically be
  418.   converted to upper case.
  419.  
  420.   The keys that will terminate this procedure are the Esc, Enter, Up
  421.   and Down Arrow keys.  TE will return the proper terminating element
  422.   number as given in appendix C.
  423. ..page
  424. ..head03AFillColAttr
  425. ■ Description
  426.  
  427.   Display a column of attribute bytes on the screen.
  428.  
  429.  
  430. ■ Summary
  431.  
  432.   Procedure FillColAttr( x, y, NRows, Attr : Integer );
  433.  
  434.   x           defines column to begin display of attribute.
  435.  
  436.   y           defines row to begin display of attribute.
  437.  
  438.   NRows       integer in the range 1-25 for the number of rows to
  439.               display the attribute byte on.
  440.  
  441.   Attr        integer in the range 0-255. It is the attribute byte to
  442.               be displayed on the screen.
  443.  
  444.  
  445. ■ Remarks
  446.  
  447.   FillColAttr always acts on the entire screen and is NOT sensitive to
  448.   Turbo's currently defined window.
  449.  
  450.  
  451. ■ See Also
  452.  
  453.   FillColCell, FillColChar
  454.  
  455.  
  456. ■ Example
  457.  
  458.   Program Example;
  459.   Uses FPVideo;
  460.   Var
  461.      i : Integer;
  462.   Begin
  463.      ClrWin( 1, 1, 80, 25, 7 );
  464.      For i := 1 To 80 Do
  465.         FillColAttr( i, 1, 20, 48+i );
  466.      GetKey();
  467.   End.
  468.  
  469.   In this example the attribute 48+i will be displayed twenty times in
  470.   each column of the display starting on row one of the screen.
  471. ..page
  472. ..head03AFillColCell
  473. ■ Description
  474.  
  475.   Fill a column on the screen with a character.
  476.  
  477.  
  478. ■ Summary
  479.  
  480.   Procedure FillColCell( x, y, NRows : Integer; Cell : Word );
  481.  
  482.   x           defines column to begin display of data.
  483.  
  484.   y           defines row to begin display of data.
  485.  
  486.   NRows       integer in the range 1-25 for the number of rows to
  487.               display the character and attribute bytes on the screen.
  488.  
  489.   Cell        integer in the range 0-0xffff.  This is the character
  490.               and attribute word combination where the high order byte
  491.               is the character and the low order byte is the attribute
  492.               to be displayed.
  493.  
  494.  
  495. ■ Remarks
  496.  
  497.   FillColCell always acts on the entire screen and is NOT sensitive to
  498.   Turbo's currently defined window.
  499.  
  500.  
  501. ■ See Also
  502.  
  503.   FillColAttr, FillColChar
  504.  
  505.  
  506. ■ Example
  507.  
  508.   Program Example;
  509.   Uses FPVideo;
  510.   Var
  511.      i : Integer;
  512.   Begin
  513.      For i := 1 To 80 Do
  514.         FillColCell( i, 1, 20, ( (65+i) Shl 8 ) + 48+i );
  515.   End.
  516.  
  517.   In this example the character is ordinal value of 'A' plus i and
  518.   attribute value is 48+i.  The character attribute cell combination
  519.   will be displayed twenty times in each column of the display
  520.   starting on row one of the screen.
  521. ..page
  522. ..head03AFillColChar
  523. ■ Description
  524.  
  525.   Fill a column on the screen with a character.
  526.  
  527.  
  528. ■ Summary
  529.  
  530.   Procedure FillColChar( x, y, NRows : Integer; Ch : Char );
  531.  
  532.   x           defines column to begin display of character.
  533.  
  534.   y           defines row to begin display of character.
  535.  
  536.   NRows       integer in the range 1-25 for the number of rows to
  537.               display the character on.
  538.  
  539.   Ch          char in the range 0-255. It is the character to be
  540.               displayed on the screen.
  541.  
  542.  
  543. ■ Remarks
  544.  
  545.   FillColChar always acts on the entire screen and is NOT sensitive to
  546.   Turbo's currently defined window.
  547.  
  548.  
  549. ■ See Also
  550.  
  551.   FillColAttr, FillColCell
  552.  
  553.  
  554. ■ Example
  555.  
  556.   Program Example;
  557.   Uses FPVideo;
  558.   Var
  559.      i : Integer;
  560.   Begin
  561.      For i := 1 To 80 Do
  562.         FillColChar( i, 1, 20, Chr( 64+i ) );
  563.   End.
  564.  
  565.   In this example the character '@'+i will be displayed twenty times
  566.   in each column of the display starting on row one of the screen.
  567. ..page
  568. ..head03AFillFrameAttr
  569. ■ Description
  570.  
  571.   Fill the frame area defined by x1,y1,x2,y2 coordinates with the
  572.   attribute byte defined.
  573.  
  574.  
  575. ■ Summary
  576.  
  577.   Procedure FillFrameAttr( x1, y1, x2, y2, Attr : Integer );
  578.  
  579.   x1          left column of window.
  580.  
  581.   y1          top row of window.
  582.  
  583.   x2          right column of window.
  584.  
  585.   y2          bottom row of window.
  586.  
  587.   Attr        integer in the range 0-255.  It is the attribute to be
  588.               displayed on the screen in the specified frame area.
  589.  
  590.  
  591. ■ See Also
  592.  
  593.   FillFrameCell, FillFrameChar
  594.  
  595.  
  596. ■ Example
  597.  
  598.   Program Example;
  599.   Uses FPVideo;
  600.   Begin
  601.      FillFrameAttr( 1, 1, 80, 25, 48 );
  602.   End.
  603.  
  604.   FillFrameAttr in this example will, on a color display, make the
  605.   background color cyan and all display characters black for the
  606.   foreground color.
  607. ..page
  608. ..head03AFillFrameCell
  609. ■ Description
  610.  
  611.   Fill the frame area defined by x1,y1,x2,y2 coordinates with the cell
  612.   defined.
  613.  
  614.  
  615. ■ Summary
  616.  
  617.   Procedure FillFrameCell( x1, y1, x2, y2 : Integer; Cell : Word );
  618.  
  619.   x1          left column of window.
  620.  
  621.   y1          top row of window.
  622.  
  623.   x2          right column of window.
  624.  
  625.   y2          bottom row of window.
  626.  
  627.   Cell        integer in the range 0-255.  This is the character and
  628.               attribute word combination where the high byte is the
  629.               character and the low byte is the attribute for the cell
  630.               to be displayed on the screen in the specified frame
  631.               area.
  632.  
  633.  
  634. ■ See Also
  635.  
  636.   FillFrameAttr, FillFrameChar
  637.  
  638.  
  639. ■ Example
  640.  
  641.   Program Example;
  642.   Uses FPVideo;
  643.   Begin
  644.      FillFrameCell( 1, 1, 80, 25, $2007 );
  645.   End.
  646.  
  647.   FillFrameCell in this example will move spaces to every character
  648.   byte on the screen and the attribute byte will get the decimal
  649.   character 07. This call will have the same effect as a cls from DOS.
  650. ..page
  651. ..head03AFillFrameChar
  652. ■ Description
  653.  
  654.   Fill the frame area defined by x1,y1,x2,y2 coordinates with the
  655.   character byte defined.
  656.  
  657.  
  658. ■ Summary
  659.  
  660.   Procedure FillFrameChar( x1, y1, x2, y2 : Integer; Ch : Char );
  661.  
  662.   x1          left column of window.
  663.  
  664.   y1          top row of window.
  665.  
  666.   x2          right column of window.
  667.  
  668.   y2          bottom row of window.
  669.  
  670.   Ch          character that will be displayed on the screen in the
  671.               specified frame area.
  672.  
  673.  
  674. ■ See Also
  675.  
  676.   FillFrameAttr, FillFrameCell
  677.  
  678.  
  679. ■ Example
  680.  
  681.   Program Example;
  682.   Uses FPVideo;
  683.   Begin
  684.      FillFrameChar( 1, 1, 80, 25, ' ' );
  685.   End.
  686.  
  687.   FillFrameChar in this example will move spaces to every character
  688.   byte on the screen.  It will have almost the same effect as a ClrScr
  689.   call.
  690. ..page
  691. ..head03AFillRowAttr
  692. ■ Description
  693.  
  694.   Write N copies of the attribute byte on the screen starting at the
  695.   specified x,y coordinates.
  696.  
  697.  
  698. ■ Summary
  699.  
  700.   Procedure FillRowAttr( x, y, NBytes, Attr : Integer );
  701.  
  702.   x           defines column to begin display of attribute byte.
  703.  
  704.   y           defines row to begin display of attribute byte.
  705.  
  706.   NBytes      gives number of times to display the attribute byte on
  707.               the screen.
  708.  
  709.   Attr        integer in the range 0-255.  It is the attribute byte to
  710.               be displayed on the screen.
  711.  
  712.  
  713. ■ Remarks
  714.  
  715.   FillRowAttr always acts on the entire screen and is NOT sensitive to
  716.   Turbo's currently defined window.
  717.  
  718.  
  719. ■ See Also
  720.  
  721.   FillRowCell, FillFrameChar
  722.  
  723.  
  724. ■ Example
  725.  
  726.   Program Example;
  727.   Uses FPVideo;
  728.   Begin
  729.      FillRowAttr( 1, 1, 80, 48 );
  730.   End.
  731.  
  732.   In this example, starting at row one, column one of the screen, the
  733.   color attribute byte 48 will be used.
  734. ..page
  735. ..head03AFillRowCell
  736. ■ Description
  737.  
  738.   Write N copies of the character and attribute byte on the screen
  739.   starting at the specified x,y coordinates.
  740.  
  741.  
  742. ■ Summary
  743.  
  744.   Procedure FillRowCell( x, y, NWords : Integer; Cell : Word );
  745.  
  746.   x           defines column to begin display of cell word.
  747.  
  748.   y           defines row to begin display of cell word.
  749.  
  750.   NWords      gives the number times to display the character and
  751.               attribute bytes on the screen.
  752.  
  753.   Cell        character and attribute bytes to be displayed on the
  754.               screen.
  755.  
  756.  
  757. ■ Remarks
  758.  
  759.   FillRowCell always acts on the entire screen and is NOT sensitive to
  760.   Turbo's currently defined window.
  761.  
  762.  
  763. ■ See Also
  764.  
  765.   FillRowAttr, FillFrameChar
  766.  
  767.  
  768. ■ Example
  769.  
  770.   Program Example;
  771.   Uses FPVideo;
  772.   Begin
  773.      FillRowCell( 1, 1, 80, ( Ord( '-' ) Shl 8 ) + 7 );
  774.   End.
  775.  
  776.   In this example eighty minus sign characters will be displayed
  777.   starting on row one, column one of the screen.  The attribute value
  778.   is 7.
  779. ..page
  780. ..head03AFillRowChar
  781. ■ Description
  782.  
  783.   Write N copies of the character byte on the screen starting at the
  784.   specified x,y coordinates.
  785.  
  786.  
  787. ■ Summary
  788.  
  789.   Procedure FillRowChar( x, y, NBytes : Integer; Ch : Char );
  790.  
  791.   x           defines column to begin display of character.
  792.  
  793.   y           defines row to begin display of character.
  794.  
  795.   NBytes      gives number of times to display the character on the
  796.               screen.
  797.  
  798.   Ch          value in the range 0-255.  It is the character to be
  799.               displayed on the screen.
  800.  
  801.  
  802. ■ Remarks
  803.  
  804.   FillRowChar always acts on the entire screen and is NOT sensitive to
  805.   Turbo's currently defined window.
  806.  
  807.  
  808. ■ See Also
  809.  
  810.   FillRowAttr, FillFrameCell
  811.  
  812.  
  813. ■ Example
  814.  
  815.   Program Example;
  816.   Uses FPVideo;
  817.   Begin
  818.      FillRowChar( 1, 1, 80, '-' );
  819.   End.
  820.  
  821.   In this example eighty minus sign characters will be displayed
  822.   starting on row one, column one of the screen.
  823. ..page
  824. ..head03AFrameWin
  825. ■ Description
  826.  
  827.   Frames the window currently defined by the global variables WindMax
  828.   and WindMin with the specified characters.
  829.  
  830.  
  831. ■ Summary
  832.  
  833.   Procedure FrameWin( UL, UR, LL, LR, Hor, Ver : Char;
  834.                       Attr                     : Integer );
  835.  
  836.   UL          character in upper left corner of the window.
  837.  
  838.   UR          character in upper right corner of the window.
  839.  
  840.   LL          character in lower left corner of the window.
  841.  
  842.   LR          character in lower right corner of the window.
  843.  
  844.   Hor         horizontal character for top and bottom rows of the
  845.               window.
  846.  
  847.   Ver         vertical character for the left and right columns of the
  848.               window.
  849.  
  850.   Attr        attribute color to use for the window frame display.
  851.  
  852.  
  853. ■ Remarks
  854.  
  855.   FrameWin will outline the window that is currently defined by the
  856.   global variables WindMin and WindMax with the characters passed.
  857.   The coordinates given by WindMin and WindMax are used to frame the
  858.   window area.
  859.  
  860.   Once the window frame has been displayed WindMin and WindMax will be
  861.   adjusted so the window will fit within the framed area.  (e.g. if if
  862.   the current window is defined as 1,1,80,25 then after FrameWin the
  863.   current window will be 2,2,79,24).
  864. ..page
  865. ■ Example
  866.  
  867.   Program Example;
  868.   Uses FPVideo;
  869.   Begin
  870.      WindowFP( 1, 1, 80, 25 );
  871.      FrameWin( '-', '-', '-', '-', '-', '|', 7 );
  872.   End.
  873.  
  874.   The above statement will use minus signs for the top and bottom
  875.   lines and the single bar for the two sides. The frame will be normal
  876.   color.
  877.  
  878.  
  879. ■ Example
  880.  
  881.   Program Example;
  882.   Uses FPVideo;
  883.   Begin
  884.      WindowFP( 1, 1, 80, 25 );
  885.      FrameWin( 'L', 'R', 'l', 'r', 'H', 'V', 48 );
  886.   End.
  887.  
  888.   The frame this statement will draw is shown below; the color for the
  889.   frame of the window is attribute value 48.
  890.  
  891.  
  892.                  LHHHHHHHHHHHHHHHHHHHHHHHHHHR
  893.                  V                          V
  894.                  V                          V
  895.                  V                          V
  896.                  V                          V
  897.                  V                          V
  898.                  V                          V
  899.                  V                          V
  900.                  lHHHHHHHHHHHHHHHHHHHHHHHHHHr
  901. ..page
  902. ..head03AGetCursorSize
  903. ■ Description
  904.  
  905.   Reports the starting and ending scan lines of the current cursor.
  906.  
  907.  
  908. ■ Summary
  909.  
  910.   Function GetCursorSize : Word;
  911.  
  912.  
  913. ■ Remarks
  914.  
  915.   Gets the cursor size by reporting the starting scan line in the high
  916.   byte and the ending scan line in the low byte of the word.
  917.  
  918.      High byte -- starting scan line
  919.      Low byte  -- ending scan line
  920.  
  921.  
  922. ■ Example
  923.  
  924.   Program Example;
  925.   Uses FPVideo;
  926.   Begin
  927.      Writeln( (GetCursorSize Shr 8):5,(GetCursorSize And $00ff):5 );
  928.   End.
  929.  
  930.   This example will print on one line the current starting scan line
  931.   and ending scan line respectively.
  932.  
  933.  
  934. ■ See Also
  935.  
  936.   SetCursorSize
  937.  
  938.  
  939. ■ Example
  940.  
  941.   j = GetCursorSize();
  942.  
  943.   In this example j will receive the starting and ending scan line of
  944.   the cursor where:
  945.      hi byte - starting scan line
  946.      lo byte - ending scan line
  947. ..page
  948. ..head03AGetFrameAttr
  949. ■ Description
  950.  
  951.   Read the attribute bytes for the specified area on the screen into
  952.   the buffer area.
  953.  
  954.  
  955. ■ Summary
  956.  
  957.   Procedure GetFrameAttr( x1, y1, x2, y2 : Integer; Var Buffer );
  958.  
  959.   x1          left column of window.
  960.  
  961.   y1          top row of window.
  962.  
  963.   x2          right column of window.
  964.  
  965.   y2          bottom row of window.
  966.  
  967.   Buffer      data area where data from screen will be placed.
  968.  
  969.  
  970. ■ See Also
  971.  
  972.   GetFrameCell, GetFrameChar
  973.  
  974.  
  975. ■ Example
  976.  
  977.   Program Example;
  978.   Uses FPVideo;
  979.   Var
  980.      Buffer : Array[1..2000] Of Char;
  981.      i      : Integer;
  982.   Begin
  983.      GetFrameAttr( 1, 1, 80, 25, Buffer );
  984.   End.
  985.  
  986.   This example will read the 2000 attribute bytes from the screen and
  987.   place every byte that is read into its corresponding byte position
  988.   in the buffer array.
  989. ..page
  990. ..head03AGetFrameCell
  991. ■ Description
  992.  
  993.   Read the character and attributes bytes for the specified area on
  994.   the screen into the buffer area.
  995.  
  996.  
  997. ■ Summary
  998.  
  999.   Procedure GetFrameCell( x1, y1, x2, y2 : Integer; Var Buffer );
  1000.  
  1001.   x1          left column of window.
  1002.  
  1003.   y1          top row of window.
  1004.  
  1005.   x2          right column of window.
  1006.  
  1007.   y2          bottom row of window.
  1008.  
  1009.   Buffer      data area where data from screen will be placed.
  1010.  
  1011.  
  1012. ■ See Also
  1013.  
  1014.   GetFrameAttr, GetFrameChar
  1015.  
  1016.  
  1017. ■ Example
  1018.  
  1019.   Program Example;
  1020.   Uses FPVideo;
  1021.   Var
  1022.      Buffer : Array[1..4000] Of Char;
  1023.      i      : Integer;
  1024.   Begin
  1025.      GetFrameCell( 1, 1, 80, 25, Buffer );
  1026.   End.
  1027.  
  1028.   This example will read the 4000 character and attribute bytes from
  1029.   the screen and place every byte that is read into its corresponding
  1030.   character attribute byte position in the buffer array.
  1031. ..page
  1032. ..head03AGetFrameChar
  1033. ■ Description
  1034.  
  1035.   Read the character bytes for the specified area on the screen into
  1036.   the buffer area.
  1037.  
  1038.  
  1039. ■ Summary
  1040.  
  1041.   Procedure GetFrameChar( x1, y1, x2, y2 : Integer; Var Buffer );
  1042.  
  1043.   x1          left column of window.
  1044.  
  1045.   y1          top row of window.
  1046.  
  1047.   x2          right column of window.
  1048.  
  1049.   y2          bottom row of window.
  1050.  
  1051.   Buffer      data area where data from screen will be placed.
  1052.  
  1053.  
  1054. ■ See Also
  1055.  
  1056.   GetFrameAttr, GetFrameCell
  1057.  
  1058.  
  1059. ■ Example
  1060.  
  1061.   Program Example;
  1062.   Uses FPVideo;
  1063.   Var
  1064.      Buffer : Array[1..2000] Of Char;
  1065.      i      : Integer;
  1066.   Begin
  1067.      GetFrameChar( 1, 1, 80, 25, Buffer );
  1068.   End.
  1069.  
  1070.   This example will read the 2000 characters from the screen and place
  1071.   every character that is read into its corresponding character
  1072.   position in the buffer array.
  1073. ..page
  1074. 
  1075.